#pragma once

namespace ManagedVC1
{
	public ref class QuantizationProperties
	{
	private:
		unsigned long m_AdaptiveQuant, m_DQuantOption, m_DQuantPStrength, m_DQuantBStrength;
	public:
		property unsigned long AdaptiveQuantization
		{
			unsigned long get() { return m_AdaptiveQuant; }
			void set(unsigned long value)
			{
				if (value > 20) throw gcnew System::ArgumentOutOfRangeException("AdaptiveQuantization cannot be larger than 20");
				m_AdaptiveQuant = value;
			}
		}

		property unsigned long DQuantOption
		{
			unsigned long get() { return m_DQuantOption; }
			void set(unsigned long value)
			{
				if (value > 3) throw gcnew System::ArgumentOutOfRangeException("DQuantOption cannot be larger than 3");
				m_DQuantOption = value;
			}
		}

		// TODO enforce restriction of the strengths related to the option
		property unsigned long DQuantPStrength
		{
			unsigned long get() { return m_DQuantPStrength; }
			void set(unsigned long value)
			{
				if (value > 2) throw gcnew System::ArgumentOutOfRangeException("DQuantPStrength cannot be larger than 2");
				m_DQuantPStrength = value;
			}
		}

		property unsigned long DQuantBStrength
		{
			unsigned long get() { return m_DQuantBStrength; }
			void set(unsigned long value)
			{
				if (value > 4) throw gcnew System::ArgumentOutOfRangeException("DQuantBStrength cannot be larger than 4");
				m_DQuantBStrength = value;
			}
		}
	};
}